package tt.com.common.model;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import tt.com.common.annotation.IsNull;
import tt.com.common.enums.AuditEnum;
import tt.com.common.enums.StockEnum;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 仓库记录表
 * IsNull:
 * <br> warehouseId(仓库id)
 * <br> goodsId(物品id)
 * <br> type(操作类型)
 * <br> price(单价)
 * <br> count(数量)
 * <br> manufacturers(生产产商)
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "yx_common_warehouse_stock_record")
public class YxCommonWarehouseStockRecord {
    public static final String COL_ID = "id";
    public static final String COL_WAREHOUSE_ID = "warehouse_id";
    public static final String COL_GOODS_ID = "goods_id";
    public static final String COL_PRICE = "price";
    public static final String COL_COUNT = "count";
    public static final String COL_COST = "cost";
    public static final String COL_IN_TIME = "in_time";
    public static final String COL_LEADER_ID = "leader_id";
    public static final String COL_MANUFACTURERS = "manufacturers";
    public static final String COL_AUDIT_STATUS = "audit_status";
    public static final String COL_CAUSE = "cause";
    public static final String COL_AUDIT_USER_ID = "audit_user_id";
    public static final String COL_AUDIT_TIME = "audit_time";
    public static final String COL_TYPE = "type";
    public static final String COL_REMARK = "remark";
    public static final String COL_CREATE_TIME = "create_time";
    public static final String COL_CREATE_USER_ID = "create_user_id";
    public static final String COL_LAST_UPDATE_TIME = "last_update_time";
    public static final String COL_LAST_UPDATE_USER_ID = "last_update_user_id";
    public static final String COL_DELETE_TIME = "delete_time";
    public static final String COL_DELETE_USER_ID = "delete_user_id";
    public static final String COL_DATA_STATUS = "data_status";
    public static final String COL_ORGAN_ID = "organ_id";
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;
    /**
     * 操作仓库id
     */
    @TableField(value = "warehouse_id")
    @IsNull
    private String warehouseId;
    /**
     * 物品id
     */
    @TableField(value = "goods_id")
    @IsNull
    private String goodsId;
    /**
     * 商品入库单价
     */
    @TableField(value = "price")
    @IsNull
    private BigDecimal price;
    /**
     * 数量
     */
    @TableField(value = "`count`")
    @IsNull
    private BigDecimal count;
    /**
     * 合计金额
     */
    @TableField(value = "cost")
    private BigDecimal cost;
    /**
     * 操作时间
     */
    @TableField(value = "in_time")
    private Date inTime;
    /**
     * 负责人
     */
    @TableField(value = "leader_id")
    private String leaderId;
    /**
     * 生产厂商
     */
    @TableField(value = "manufacturers")
    @IsNull
    private String manufacturers;
    /**
     * 审核状态
     */
    @TableField(value = "audit_status")
    private AuditEnum auditStatus;
    /**
     * 审核失败原因
     */
    @TableField(value = "cause")
    private String cause;
    /**
     * 审核人
     */
    @TableField(value = "audit_user_id")
    private String auditUserId;
    /**
     * 审核时间
     */
    @TableField(value = "audit_time")
    private Date auditTime;
    /**
     * 类型(退货入库,正常入库，调拨入库,销售出库，调拨出库, 采购入库)
     */
    @TableField(value = "`type`")
    @IsNull
    private StockEnum type;
    /**
     * 备注
     */
    @TableField(value = "remark")
    private String remark;
    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private Date createTime;
    /**
     * 创建人
     */
    @TableField(value = "create_user_id")
    private String createUserId;
    /**
     * 最后修改时间
     */
    @TableField(value = "last_update_time")
    private Date lastUpdateTime;
    /**
     * 最后修改人
     */
    @TableField(value = "last_update_user_id")
    private String lastUpdateUserId;
    /**
     * 删除时间
     */
    @TableField(value = "delete_time")
    private Date deleteTime;
    /**
     * 删除人
     */
    @TableField(value = "delete_user_id")
    private String deleteUserId;
    /**
     * 删除状态(0删除 1正常)
     */
    @TableLogic
    @TableField(value = "data_status")
    private Integer dataStatus;
    /**
     * 组织id
     */
    @TableField(value = "organ_id")
    private String organId;
}